package com.hrms.view;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import com.hrms.core.Constants;
import com.hrms.domain.BusinessObjectImpl;
import com.hrms.domain.Task;
import com.hrms.model.TaskListModel;



public class PlannedTaskView extends TaskView {

	@Override
	public Collection<TaskListModel> getTaskViewModel() {
		TaskListModel tmp = null;
		List<Task> tasks = BusinessObjectImpl.select(Task.class, "where status == :p && userId== :p1", new Object[]{ Constants.Status.Planned.toString(), getUserId() } );
		List<TaskListModel> tlm = new ArrayList<TaskListModel>();
		
		for(Task task: tasks){
			tmp = new TaskListModel();
			tmp.setTask(task);
			tlm.add(tmp);
		}

		return tlm;
	}

	@Override
	public Boolean showDailyCell() {
		return Boolean.FALSE;
	}
	
	
	
}
